import { gql } from '@apollo/client';

export const getStudents = gql`
query getStudents($page:PageInput!,$name:String) {
  getStudents(page:$page,name:$name) {
    code
    message
    data {
      name
      id,
      avatar,
      tel,
      account,
      createdAt
    },
    page {
      pageNum
      pageSize
      total
    }
  }
}
`;

export const deleteStudent = gql`
mutation deleteStudent($id:String!) {
  deleteStudent(id:$id) {
    code,
    message
  }
}
`;

export const getStudentInfo = gql`
query getStudentInfo($id: String!) {
  getStudentInfo(id:$id) {
    code,
    data {
      name
      id
      tel
      avatar
      account
      password
    },
    message
  }
}
`;

export const commitStudentInfoPC = gql`
mutation commitStudentInfoPC($params: StudentInput!,$id: String!) {
  commitStudentInfoPC(params:$params,id:$id) {
    code,
    message
  }
}
`;
